package domain

import (
	"github.com/hlhutu/gormplus"
	"ruoyi-go/internal/framework/db"
)

type SysDictType struct {
	// 字典主键
	DictId int64 `json:"dictId" gorm:"column:dict_id" form:"dictId"`
	// 字典名称
	DictName string `json:"dictName" gorm:"column:dict_name" form:"dictName"`
	// 字典类型
	DictType string `json:"dictType" gorm:"column:dict_type" form:"dictType"`
	// 状态（0正常 1停用）
	Status string `json:"status" gorm:"column:status" form:"status"`
}

func (m SysDictType) TableName() string {
	return "sys_dict_type"
}

type sysDictTypeModel struct {
	gormplus.Model[SysDictType]
}

var sysDictTypeModelInst *sysDictTypeModel

func SysDictTypeModel() *sysDictTypeModel {
	if sysDictTypeModelInst == nil {
		sysDictTypeModelInst = &sysDictTypeModel{Model: gormplus.NewModel(SysDictType{}, db.GormDB)}
	}
	return sysDictTypeModelInst
}
